package com.wsdcd.zlg.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@AllArgsConstructor
@Data
@NoArgsConstructor
public class PagerUtil<E> {
	/**
	 * 状态码 0是成功
	 */
	private int code;
	/**
	 * 响应信息
	 */
	private String msg;
	/**
	 * 总条数
	 */
	private int count ;
	/**
	 * 展示的数据
	 */
	private List<E> data;

	public PagerUtil(int count, List<E> data) {
		super();
		this.count = count;
		this.data = data;
	}
	public PagerUtil(int code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}
	@Override
	public String toString() {
		return "PagerUtil [code=" + code + ", msg=" + msg + ", count=" + count
				+ ", data=" + data + "]";
	}
	
}
